package com.aspose.cells.b.a.b.a;

import com.aspose.cells.b.a.b.zo;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D.Float;

public class zi implements Cloneable {
   private static zi a = new zi();
   private AffineTransform b;

   public zi() {
      this.b = new AffineTransform();
   }

   public zi(AffineTransform var1) {
      this.b = var1;
   }

   public zi(float var1, float var2, float var3, float var4, float var5, float var6) {
      this(new AffineTransform(var1, var2, var3, var4, var5, var6));
   }

   public void a(zi var1) {
      var1.a().setTransform(this.a());
   }

   public AffineTransform a() {
      return this.b;
   }

   public zi b() {
      return new zi((AffineTransform)this.b.clone());
   }

   public boolean c() {
      return this.b.isIdentity();
   }

   public boolean equals(Object obj) {
      if (obj instanceof zi) {
         zi var2 = (zi)obj;
         return var2.b.equals(var2.b);
      } else {
         return false;
      }
   }

   public int hashCode() {
      return this.b.hashCode();
   }

   public void a(float var1) {
      this.b.rotate(Math.toRadians((double)var1));
   }

   public void a(float var1, int var2) {
      this.a(AffineTransform.getRotateInstance(Math.toRadians((double)var1)), var2);
   }

   public void a(float var1, zo var2) {
      this.b.rotate(Math.toRadians((double)var1), (double)var2.d(), (double)var2.e());
   }

   public void b(zi var1) {
      this.a((zi)var1, 0);
   }

   public void a(zi var1, int var2) {
      this.a(var1.b, var2);
   }

   public void a(float var1, float var2) {
      this.b.scale((double)var1, (double)var2);
   }

   public void a(float var1, float var2, int var3) {
      this.a(AffineTransform.getScaleInstance((double)var1, (double)var2), var3);
   }

   public void a(zo[] var1) {
      Float var2 = new Float();

      for(int var3 = 0; var3 < var1.length; ++var3) {
         var2.setLocation(var1[var3].d(), var1[var3].e());
         this.b.transform(var2, var2);
         var1[var3].a((float)var2.getX());
         var1[var3].b((float)var2.getY());
      }

   }

   public void b(float var1, float var2) {
      this.b.translate((double)var1, (double)var2);
   }

   public void b(float var1, float var2, int var3) {
      this.a(AffineTransform.getTranslateInstance((double)var1, (double)var2), var3);
   }

   public void c(float var1, float var2) {
      this.b.shear((double)var1, (double)var2);
   }

   public void d() {
      this.b.setToIdentity();
   }

   public float[] e() {
      float[] var1 = new float[]{(float)this.b.getScaleX(), (float)this.b.getShearY(), (float)this.b.getShearX(), (float)this.b.getScaleY(), (float)this.b.getTranslateX(), (float)this.b.getTranslateY()};
      return var1;
   }

   private void a(AffineTransform var1, int var2) {
      a(this.b, var1, var2);
   }

   private static void a(AffineTransform var0, AffineTransform var1, int var2) {
      if (var2 == 0) {
         var0.concatenate(var1);
      } else {
         var0.preConcatenate(var1);
      }

   }

   public void f() {
      try {
         this.b = this.b.createInverse();
      } catch (Exception var2) {
         ;
      }

   }
}
